home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The AGA Experience 2
/
agavol2.iso
/
software
/
utilities
/
emulation
/
zxam spectrum
/
zxam_rexx
/
english
/
loadscr.zxam
< prev
next >
Wrap
Text File
|
1995-07-31
|
929b
|
34 lines
/* this scrip loads a spectrum screen (files .scr saved by "Z80") */
/* test if emulator is present */
address command
if ~show(ports,ZXAM_REXX) then do
requestchoice 'title "ZXAM Script error..." body "I can''t find the emulator''s port!!" gadgets "AARGH!"'
exit
end
/* store the initial status of the emulator */
running=zxamactrun() /* 1=running */
zxamstop() /* stop the emulation */
/* LOAD requester */
oldpath=zxamactloadpath()
oldpattern=zxamactpattern()
zxampattern('#?.scr')
nombre=zxamloadrequester('Select the .scr file...')
zxamloadpath(oldpath)
zxampattern(oldpattern)
if nombre='' then exit 0 /* CANCEL */
pantalla=zxampploadfile(nombre) /* load the whole file */
if length(pantalla)~=6912 then exit /* test if it's a screen */
zxamputmem(16384,pantalla) /* place the file in the spectrum's screen */
/* restore the status */
if running=1 then zxamrun()
exit